package jxerializeml.clues.fields;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Changes some informations about the field which will be written into the
 * output document. This field will be also used in the process of
 * deserialization to translate these changed informations back.
 * 
 * @author Tomáš Zíma
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface RewriteField {
	/**
	 * @return
	 *     Changed name of the field which will be written to the
	 *     output document. If name shouldn't be changed, empty
	 *     string will be returned.
	 */
	public String	fieldName() default "";
	
	/**
	 * @return
	 *     Changed type of the field which will be written to the
	 *     output document. If type is "void", it means that it
	 *     shouldn't be changed.
	 */
	public Class<?>	classType() default void.class;
}
